<template>
    <div class="block">
        <el-carousel :interval="4000" type="card" height="400px">
            <el-carousel-item v-for="item in imgList" :key="item.id">
                <img :src="item.src" alt="" class="image">
            </el-carousel-item>
        </el-carousel>
    </div>
</template>
<style>
.image {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
        /*锁定图片的长宽比 */
}
</style>
<script>
export default {
    name: 'img',
    data() {
        return {
            imgList: [
                {
                src: "http://47.93.99.8:81/img/1.1.jpg",
            }, {
                src: "http://47.93.99.8:81/img/2.jpg",
            },
            {
                src: "http://47.93.99.8:81/img/3.jpg",
            },
            ]
        }
    }


}
</script>